Skip to main content

Configuring a Proxy for License Server Connections From Java Engine

The Fluent engine needs to phone home to the license server to report your usage. If you are behind a proxy server, you will need to configure the Fluent engine to use the proxy server to connect to the license server.

Configuring a Proxy for License Server Connections

You may configure this proxy server in your Java code prior to calling any Fluent engine methods. The following code snippet shows how to configure a proxy server for the Fluent engine:

public void setProxy(String proxyHost, String proxyPort) {
Properties systemProperties = System.getProperties();
systemProperties.setProperty("https.proxyHost", "proxyHost");
systemProperties.setProperty("https.proxyPort", "proxyPort");
}

Configuring Authentication for Proxy Server Connections

If your proxy requires authentication you will need to set the default authentication for your proxy prior to calling any Fluent Code. The following code snippet shows an example for configuring the default authenticator.

public void setAuthenticator() {
Authenticator authenticator = new Authenticator(String username, String password) {
public PasswordAuthentication getPasswordAuthentication() {
return (new PasswordAuthentication(username, password.toCharArray()));
}
};
Authenticator.setDefault(authenticator);
}